//
//  main.c
//  CmdPacket
//
//  Created by hua on 2021/12/12.
//

#include <stdio.h>
#include "cmd_packet.h"

int main(int argc, const char * argv[]) {
    uint8_t buf1[512];
    uint8_t buf2[512];
    CmdPacket *pkg = (CmdPacket *)buf1;
    pkg->len = 0x03;
    pkg->data[0] = CMD_PACKET_GENG;
    pkg->data[1] = CMD_PACKET_BEGIN;
    pkg->data[2] = CMD_PACKET_ENG;
    int size = pkg_send(pkg, buf2);
    pkg_recv(buf2, size);
    return 0;
}
